home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Textfiles / zines / Happle / happle10.sit.hqx / Happle#10 / Files / Denial.sit / DoS / solaris_ping.txt < prev    next >
Text File  |  1998-12-09  |  2KB  |  83 lines

  1.  
  2. Here is a way to reboot a Solaris box,
  3. and is exploitable by anyone with an account on
  4. the system since ping is setuid root.
  5.  
  6. ping -sv -i 127.0.0.1 224.0.0.1
  7.  
  8. On solaris 2.5, causes the machine to reboot (personal experience).  I've
  9. had independent reports of it crashing 2.5.1, and 2.5 (x86).  It probably works
  10. on all versions of Solaris.
  11.  
  12. To "fix" the denial of service:
  13. chmod go-x /usr/sbin/ping
  14. if you don't mind disabling ping on your system.
  15.  
  16.  
  17.  
  18. -------------------------------------------------------------------------------- 
  19.  
  20.    To fix:
  21.  
  22.       /usr/sbin/ndd -set /dev/ip ip_respond_to_echo_broadcast 0
  23.      
  24.       should be added to /etc/init.d/inetinit to be permanent.
  25.  
  26.  
  27.  
  28. --------------------------------------------------------------------------------
  29.  
  30. #!/bin/sh
  31. # bpowell 06/21/97  generic titan wrapper for:
  32. # add the ndd line to disable response to echo  modifies S69inet
  33. #
  34. # Note: none
  35.  
  36. # version 0.1
  37. #
  38. # setup
  39. PATH=/usr/ucb:/bin:/usr/bin:/sbin
  40. MYNAME=`basename $0`
  41.  
  42. # Check for execution by root
  43.  
  44.     if [ `/usr/xpg4/bin/id -un` != root ]
  45.     then
  46.         echo " "
  47.         echo >&2 "$MYNAME: error: must be run as root."
  48.         echo " "
  49.         exit 1
  50.     fi
  51.  
  52. #   Introduction
  53.  
  54. # cat << EOF
  55. #
  56. # This disables ip_respond_to_echo_broadcast so that specific ping crashes
  57. # don't work
  58. # The program modifies /etc/rc2.d/S69inet
  59. #
  60. # ndd -set /dev/ip ip_respond_to_echo_broadcast 0
  61. # EOF
  62.  
  63. # echo press enter to continue"\c"
  64. # read YN
  65.  
  66. if test -f /etc/rc2.d/S??inet
  67. then
  68.                 echo "  Now adding the new ndd command"
  69.  
  70.                 ed - /etc/rc2.d/S??inet <<- !
  71.                 g/tcp_old_urp_interpretation
  72.                 a
  73.                 ndd -set /dev/ip ip_respond_to_echo_broadcast 0
  74.                 .
  75.                 w
  76.                 Q
  77.                 !
  78.  
  79.         echo "   Modifcations to rc2.d complete"
  80. fi
  81.         echo "   Done."
  82.  
  83.